#coding = utf-8
#第一题括号匹配


ss=1
l0=raw_input()

print len(l0)
stack=[]
if len(l0)==0:
    print 0
elif len(l0)==2:
    print 2
else:
    '''
    for i in range(len(l0)-1,-1,-1):
        if l0[i]==')':
            stack.append(l0[i])

        else:
            ss*=len(stack)
            stack.pop()
    '''
    for i in range(len(l0)):
        if l0[i] == '(':
            stack.append(l0[i])

        else:
            ss *= len(stack)
            stack.pop()
    print ss


